<?php
//var_dump($this);
//die(); 
if ($this->pageCount > 1) { ?>
	<div id="paging">
        <!-- First page link -->
        <?php if (isset($this->previous)): ?>
              <a href="<?=$this->currURL ? $this->currURL.'/'.$this->first : $this->url(array('page' => $this->first)); ?>"><?=$this->translate('нач.')?></a> 
        <?php else: ?>
                <span class="disabled"><?=$this->translate('нач.')?></span> 
        <?php endif; ?>
    
        <!-- Previous page link -->
    
        <?php if (isset($this->previous)): ?>
              <a href="<?=$this->currURL ? $this->currURL.'/'.$this->previous : $this->url(array('page' => $this->previous)); ?>">&lt;</a> 
        <?php else: ?>
            <span class="disabled">&lt;</span>
        <?php endif; ?>
        <!-- Numbered page links -->
        <?php foreach ($this->pagesInRange as $page): ?>
            <?php if ($page != $this->current): ?>
                <a href="<?=$this->currURL ? $this->currURL.'/'.$page :  $this->url(array('page' => $page)); ?>"><?=$page?></a><?=($page != $this->last ? ' | ' : '')?>
            <?php else: ?>
                <b><?=$page?></b><?=($page != $this->last ? ' | ' : '')?>
            <?php endif; ?>
        <?php endforeach; ?>
        <!-- Next page link -->
        <?php if (isset($this->next)): ?>
              <a href="<?=$this->currURL ? $this->currURL.'/'.$this->next :  $this->url(array('page' => $this->next)); ?>">&gt;</a> 
        <?php else: ?>
            <span class="disabled">&gt;</span>
        <?php endif; ?>
        <!-- Last page link -->
        <?php if (isset($this->next)): ?>
              <a href="<?=$this->currURL ? $this->currURL.'/'.$this->last :  $this->url(array('page' => $this->last)); ?>"><?=$this->translate('кон.')?></a>
        <?php else: ?>
            <span class="disabled"><?=$this->translate('кон.')?></span>
        <?php endif; ?>
 </div>
 <?php } ?>